Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nulls from UncheckedProc #885 #1029

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

victornoel
Copy link
Collaborator

This is for #885

@0crat
Copy link
Collaborator

0crat commented Jan 20, 2019

Job #1029 is now in scope, role is REV

@codecov-io
Copy link

codecov-io commented Jan 20, 2019

Codecov Report

Merging #1029 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1029      +/-   ##
============================================
+ Coverage      87.4%   87.47%   +0.06%     
  Complexity     1515     1515              
============================================
  Files           266      266              
  Lines          3884     3887       +3     
  Branches        212      212              
============================================
+ Hits           3395     3400       +5     
+ Misses          440      438       -2     
  Partials         49       49
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/cactoos/func/UncheckedProc.java 100% <100%> (ø) 2 <1> (ø) ⬇️
src/main/java/org/cactoos/func/IoCheckedProc.java 100% <0%> (+33.33%) 2% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f67d300...9502abf. Read the comment docs.

@0crat
Copy link
Collaborator

0crat commented Jan 20, 2019

This pull request #1029 is assigned to @fabriciofx/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @llorllale/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be no monetary reward for this job

Copy link
Contributor

@fabriciofx fabriciofx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel Done. Please, check out.

@@ -53,7 +52,11 @@ public UncheckedProc(final Proc<X> prc) {

@Override
public void exec(final X input) {
new UncheckedFunc<>(new FuncOf<>(this.proc, null)).apply(input);
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel Please, can you add some tests here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabriciofx there already are tests for this class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel Right. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel you can use CheckedScalar here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llorllale if I use CheckedScalar then I will need to specify an object to be returned, and then I will put null :) FuncOf does use one of the Scalar class for example

@fabriciofx
Copy link
Contributor

@victornoel This PR seems fine. Thanks! @llorllale Can you merge it now?

@fabriciofx
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 20, 2019

@rultor merge

@fabriciofx Thanks for your request. @llorllale Please confirm this.

@llorllale
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 22, 2019

@rultor merge

@llorllale OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jan 22, 2019

@rultor merge

@llorllale @victornoel Oops, I failed. You can see the full log here (spent 3min)

Reading src/main/java/org/cactoos/Input.java...
Puzzle 852-196f2f04 30/DEV at src/main/java/org/cactoos/Input.java
Reading src/main/java/org/cactoos/list/NoNulls.java...
Reading src/main/java/org/cactoos/list/ListIterator.java...
Reading src/main/java/org/cactoos/list/Sticky.java...
Reading src/main/java/org/cactoos/list/Joined.java...
Reading src/main/java/org/cactoos/list/ListEnvelope.java...
Reading src/main/java/org/cactoos/list/Sorted.java...
Reading src/main/java/org/cactoos/list/ListOf.java...
Reading src/main/java/org/cactoos/list/Solid.java...
Reading src/main/java/org/cactoos/list/package-info.java...
Reading src/main/java/org/cactoos/list/Mapped.java...
Reading src/main/java/org/cactoos/list/Synced.java...
Reading src/main/java/org/cactoos/list/Shuffled.java...
Reading src/main/java/org/cactoos/set/SetEnvelope.java...
Reading src/main/java/org/cactoos/set/package-info.java...
Puzzle 980-c8642680 30/DEV at src/main/java/org/cactoos/set/package-info.java
Reading src/main/java/org/cactoos/set/SetOf.java...
Reading src/main/java/org/cactoos/Scalar.java...
Reading src/verifier/verifications.xml...
Reading .gitlint...
Reading pom.xml...
Puzzle 903-fd48e847 30/DEV at pom.xml
Reading .gitattributes...
+ git log --not master --pretty=%B
+ gitlint
Traceback (most recent call last):
  File "/usr/local/bin/gitlint", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1037, in invoke
    return Command.invoke(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/cli.py", line 169, in cli
    ctx.invoke(lint)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/cli.py", line 197, in lint
    gitcontext = GitContext.from_local_repository(lint_config.target, ctx.obj[2])
  File "/usr/local/lib/python2.7/dist-packages/gitlint/git.py", line 189, in from_local_repository
    raw_commit = _git("log", sha, "-1", long_format, _cwd=repository_path).split("\n")
  File "/usr/local/lib/python2.7/dist-packages/gitlint/git.py", line 33, in _git
    return ustr(result)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/utils.py", line 18, in ustr
    return unicode(obj)  # pragma: no cover # noqa
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 593, in __unicode__
    self.call_args["decode_errors"])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
container 4a9aa285ada67a7e57338ba18668257983a134f022d6c88d99003695b70d54c5 is dead
Tue Jan 22 02:09:19 CET 2019

@victornoel
Copy link
Collaborator Author

@llorllale I suppose the above is not meant to happen?

@llorllale
Copy link
Contributor

@victornoel no... have you tried running gitlint on your local?

@victornoel
Copy link
Collaborator Author

victornoel commented Jan 22, 2019

@llorllale the error above is not very clear, but on my local, I can see the actual error and it says I have to start the commit message with the issue number.

Are we seriously expecting people to start their commit with #, the character interpreted as a comment by the git when at the start of a line in a git message and thus ignoring the line?
It means we can't use an editor to set the git message, that sucks :)

Edit: I went too fast, actually the issue number must be inside parenthesis :)

@victornoel victornoel force-pushed the 885-unchecked-proc-no-nulls branch 2 times, most recently from 748e123 to b1983cf Compare January 22, 2019 19:34
@victornoel
Copy link
Collaborator Author

@llorllale I fixed the commit ;)

@llorllale
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 23, 2019

@rultor merge

@llorllale OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jan 23, 2019

@rultor merge

@llorllale @victornoel Oops, I failed. You can see the full log here (spent 3min)

Reading src/main/java/org/cactoos/Input.java...
Puzzle 852-196f2f04 30/DEV at src/main/java/org/cactoos/Input.java
Reading src/main/java/org/cactoos/list/NoNulls.java...
Reading src/main/java/org/cactoos/list/ListIterator.java...
Reading src/main/java/org/cactoos/list/Sticky.java...
Reading src/main/java/org/cactoos/list/Joined.java...
Reading src/main/java/org/cactoos/list/ListEnvelope.java...
Reading src/main/java/org/cactoos/list/Sorted.java...
Reading src/main/java/org/cactoos/list/ListOf.java...
Reading src/main/java/org/cactoos/list/Solid.java...
Reading src/main/java/org/cactoos/list/package-info.java...
Reading src/main/java/org/cactoos/list/Mapped.java...
Reading src/main/java/org/cactoos/list/Synced.java...
Reading src/main/java/org/cactoos/list/Shuffled.java...
Reading src/main/java/org/cactoos/set/SetEnvelope.java...
Reading src/main/java/org/cactoos/set/package-info.java...
Puzzle 980-c8642680 30/DEV at src/main/java/org/cactoos/set/package-info.java
Reading src/main/java/org/cactoos/set/SetOf.java...
Reading src/main/java/org/cactoos/Scalar.java...
Reading src/verifier/verifications.xml...
Reading .gitlint...
Reading pom.xml...
Puzzle 903-fd48e847 30/DEV at pom.xml
Reading .gitattributes...
+ git log --not master --pretty=%B
+ gitlint
Traceback (most recent call last):
  File "/usr/local/bin/gitlint", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1037, in invoke
    return Command.invoke(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/cli.py", line 169, in cli
    ctx.invoke(lint)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/cli.py", line 197, in lint
    gitcontext = GitContext.from_local_repository(lint_config.target, ctx.obj[2])
  File "/usr/local/lib/python2.7/dist-packages/gitlint/git.py", line 189, in from_local_repository
    raw_commit = _git("log", sha, "-1", long_format, _cwd=repository_path).split("\n")
  File "/usr/local/lib/python2.7/dist-packages/gitlint/git.py", line 33, in _git
    return ustr(result)
  File "/usr/local/lib/python2.7/dist-packages/gitlint/utils.py", line 18, in ustr
    return unicode(obj)  # pragma: no cover # noqa
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 593, in __unicode__
    self.call_args["decode_errors"])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
container 01fd00f8d398387e9d458c88f39704e98bfde787df605e4f3f1c4479f9400f7f is dead
Wed Jan 23 01:31:45 CET 2019

@victornoel
Copy link
Collaborator Author

@llorllale I don't understand what is the problem, it is as if there was some utf8 characters somewhere, but I can't reproduce on my machine… also it seems that travis does not exhibit the problem, only rultor…

@llorllale
Copy link
Contributor

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jan 24, 2019

@rultor merge

@llorllale OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 9502abf into yegor256:master Jan 24, 2019
@rultor
Copy link
Collaborator

rultor commented Jan 24, 2019

@rultor merge

@llorllale Done! FYI, the full log is here (took me 14min)

@0crat 0crat removed the scope label Jan 24, 2019
@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

The job #1029 is now out of scope

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

Order was finished: +15 point(s) just awarded to @fabriciofx/z

@0crat
Copy link
Collaborator

0crat commented Jan 24, 2019

Payment to ARC for a closed pull request, as in §28: +10 point(s) just awarded to @llorllale/z

@victornoel victornoel deleted the 885-unchecked-proc-no-nulls branch February 15, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants